<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>要开心！</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
            background: linear-gradient(135deg, #eef2f7 0%, #f8fafc 100%);
            background-size: 100% 100%;
            width: 100vw;
            height: 100vh;
            overflow: hidden;
            position: fixed;
            top: 0;
            left: 0;
            margin: 0;
            padding: 0;
        }

        

        /* 液态玻璃 - 彩色流动背景层（被玻璃层背后模糊） */
        .bg-blobs {
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            background:
                radial-gradient(200px 240px at 15% 25%, rgba(255, 182, 193, 0.65), transparent 60%),
                radial-gradient(240px 260px at 85% 75%, rgba(173, 216, 230, 0.65), transparent 60%),
                radial-gradient(220px 240px at 70% 20%, rgba(255, 218, 185, 0.55), transparent 60%),
                radial-gradient(240px 260px at 30% 70%, rgba(221, 160, 221, 0.55), transparent 60%),
                radial-gradient(220px 220px at 90% 35%, rgba(255, 235, 120, 0.45), transparent 60%),
                radial-gradient(260px 260px at 10% 85%, rgba(144, 238, 144, 0.5), transparent 60%);
            background-size: 200% 200%;
            animation: blobsShift 28s ease-in-out infinite alternate;
        }

        @keyframes blobsShift {
            0% { background-position: 0% 0%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 100%; }
        }

        /* 液态玻璃 - 玻璃遮罩层（实现玻璃毛玻璃质感） */
        .glass-overlay {
            position: fixed;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            background: rgba(255, 255, 255, 0.35);
            backdrop-filter: blur(40px) saturate(160%) brightness(1.05) contrast(1.02);
            -webkit-backdrop-filter: blur(40px) saturate(160%) brightness(1.05) contrast(1.02);
            box-shadow:
                inset 0 0 120px rgba(255, 255, 255, 0.25),
                inset 0 -40px 80px rgba(255, 255, 255, 0.2);
        }

        /* 输入框遮罩 */
        .input-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.4);
            backdrop-filter: blur(60px) saturate(200%) brightness(1.1);
            -webkit-backdrop-filter: blur(60px) saturate(200%) brightness(1.1);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            animation: fadeIn 0.4s ease-out;
        }

        .input-overlay.hidden {
            display: none;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* 输入框容器 */
        .input-container {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(40px) saturate(180%) brightness(1.05);
            -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.05);
            padding: 40px;
            border-radius: 0;
            border: 4px solid #2d2d2d;
            box-shadow: 
                8px 8px 0 #1a1a1a,
                inset -2px -2px 0 rgba(0, 0, 0, 0.1),
                inset 2px 2px 0 rgba(255, 255, 255, 0.9),
                0 0 60px rgba(255, 255, 255, 0.3);
            animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            width: 90%;
            max-width: 420px;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .input-box {
            width: 100%;
            padding: 16px 20px;
            border: 4px solid #2d2d2d;
            border-radius: 0;
            font-size: 16px;
            outline: none;
            transition: all 0.1s ease;
            font-family: 'Courier New', monospace;
            background: #fff;
            font-weight: 600;
            letter-spacing: 1px;
            box-shadow: 
                inset 3px 3px 0 rgba(0, 0, 0, 0.2),
                inset -1px -1px 0 rgba(255, 255, 255, 0.5);
        }

        .input-box:focus {
            border-color: #ffd93d;
            background: #fffef8;
            box-shadow: 
                inset 3px 3px 0 rgba(0, 0, 0, 0.2),
                inset -1px -1px 0 rgba(255, 255, 255, 0.5),
                0 0 0 4px rgba(255, 217, 61, 0.4);
        }

        .button-group {
            display: flex;
            gap: 12px;
            margin-top: 20px;
        }

        .btn {
            width: 100%;
            padding: 14px 24px;
            border: 4px solid #2d2d2d;
            border-radius: 0;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
            letter-spacing: 2px;
            position: relative;
            transition: all 0.1s ease;
            box-shadow: 
                4px 4px 0 #1a1a1a,
                inset -2px -2px 0 rgba(0, 0, 0, 0.3),
                inset 2px 2px 0 rgba(255, 255, 255, 0.3);
        }

        .btn-confirm {
            background: linear-gradient(180deg, #ffd93d 0%, #ffb700 100%);
            color: #2d2d2d;
            text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
        }

        .btn-confirm:hover {
            background: linear-gradient(180deg, #ffe55d 0%, #ffc520 100%);
            transform: translate(-2px, -2px);
            box-shadow: 
                6px 6px 0 #1a1a1a,
                inset -2px -2px 0 rgba(0, 0, 0, 0.3),
                inset 2px 2px 0 rgba(255, 255, 255, 0.5);
        }

        .btn:active {
            transform: translate(2px, 2px);
            box-shadow: 
                2px 2px 0 #1a1a1a,
                inset -2px -2px 0 rgba(0, 0, 0, 0.4),
                inset 2px 2px 0 rgba(255, 255, 255, 0.2);
        }

        /* 祝福卡片容器 - 备忘录风格 */
        .blessing-card {
            position: fixed;
            width: 240px;
            min-height: 100px;
            max-height: 150px;
            padding: 20px 18px 18px 18px;
            border-radius: 2px;
            box-shadow: 
                0 2px 5px rgba(0, 0, 0, 0.15),
                0 1px 2px rgba(0, 0, 0, 0.1);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: none;
            border-top: 24px solid rgba(0, 0, 0, 0.05);
            font-size: 15px;
            font-weight: 400;
            font-family: 'Segoe Print', 'Comic Sans MS', 'Microsoft YaHei', cursive;
            line-height: 1.8;
            letter-spacing: 0.5px;
            transition: all 0.3s ease;
            animation: fadeInScale 0.6s ease-out forwards;
            opacity: 0;
            z-index: 10;
            pointer-events: auto;
            transform: rotate(0deg);
            word-wrap: break-word;
            overflow-wrap: break-word;
            overflow: hidden;
        }

        .blessing-card::before {
            content: '';
            position: absolute;
            top: -18px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 16px;
            background: linear-gradient(180deg, 
                rgba(255, 255, 255, 0.4) 0%, 
                rgba(200, 200, 200, 0.3) 50%,
                rgba(255, 255, 255, 0.2) 100%);
            border-radius: 1px;
            box-shadow: 
                0 1px 2px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
            opacity: 0.8;
        }

        .blessing-card:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 
                0 6px 16px rgba(0, 0, 0, 0.25),
                0 3px 6px rgba(0, 0, 0, 0.18);
            z-index: 100;
        }

        /* 不同颜色主题 - 便签纸配色 */
        .card-pink {
            background: #ffe4e8;
            color: #5a3a3a;
        }

        .card-blue {
            background: #e3f2fd;
            color: #3a4a5a;
        }

        .card-purple {
            background: #f3e5f5;
            color: #4a3a5a;
        }

        .card-orange {
            background: #fff3e0;
            color: #5a4a3a;
        }

        .card-green {
            background: #e8f5e9;
            color: #3a5a3a;
        }

        .card-yellow {
            background: #fffde7;
            color: #5a5a3a;
        }

        .card-teal {
            background: #e0f2f1;
            color: #3a5a5a;
        }

        .card-peach {
            background: #ffeee6;
            color: #5a4a4a;
        }

        /* 淡入缩放动画 */
        @keyframes fadeInScale {
            0% {
                opacity: 0;
                transform: scale(0.5);
            }
            70% {
                opacity: 1;
                transform: scale(1.05);
            }
            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* 复古游戏风格动画 */
        @keyframes pixelPop {
            0% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0);
            }
            50% {
                transform: translate(-50%, -50%) scale(1.2);
            }
            100% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        @keyframes pixelFade {
            0% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.8);
            }
        }
    </style>
</head>
<body>
    <div class="bg-blobs" aria-hidden="true"></div>
    <div class="glass-overlay" aria-hidden="true"></div>
    <!-- 输入框遮罩 -->
    <div class="input-overlay" id="inputOverlay">
        <div class="input-container">
            <input 
                type="text" 
                class="input-box" 
                id="userInput" 
                autofocus
            >
            <div class="button-group">
                <button class="btn btn-confirm" onclick="confirmInput()">确定</button>
            </div>
        </div>
    </div>

    <script>
        // 简单的MD5实现（用于加密）
        function simpleMD5(str) {
            // 使用Base64编码作为简单加密（实际项目建议使用真正的MD5库）
            return btoa(encodeURIComponent(str));
        }

        // 解密函数
        function decryptName(encrypted) {
            try {
                return decodeURIComponent(atob(encrypted));
            } catch (e) {
                return '';
            }
        }

      const blessings = [
        "早点休息",
    "保持微笑",
    "前行不要太慢",
    "记得多休息",
    "关注天气预报",
    "天气冷了，多穿衣服",
    "多喝水",
    "记得吃早餐",
    "今天要开心哦",
    "加油鸭",
    "注意安全",
    "记得想我",
    "晚安好梦",
    "今天也要加油呀",
    "别熬夜了",
    "要照顾好自己",
    "记得按时吃饭",
    "出门记得带伞",
    "工作顺利",
    "身体健康",
    "心想事成",
    "万事如意",
    "笑口常开",
    "平安喜乐",
    "前程似锦",

    // 第一次补充（精简后保留核心短句）
    "累了就歇会儿",
    "别给自己压力",
    "今天你超棒",
    "甜日子会来",
    "胃饱心装满爱",
    "阴天给自己放晴",
    "出门别着凉",
    "不开心慢慢来",
    "每天元气满",
    "给生活加点甜",
    "照顾好情绪",
    "路上小心车",
    "午餐要吃好",
    "别硬扛，说出来",
    "今晚睡安稳",
    "努力会被看见",
    "每天有小幸运",
    "补充维生素",
    "忙完拉伸下",
    "不开心吃点好的",
    "被世界温柔待",
    "风也为你加油",
    "给家人报平安",
    "享受小美好",
    "疲惫抱抱自己",
    "明天有希望",
    "记得涂防晒",
    "皮肤水嫩嫩",
    "再忙也休息",
    "笑得像孩子",
    "劳逸结合别透支",
    "雨天走路慢",
    "吃水果补维生",
    "你值得被偏爱",
    "睡一觉元气满",
    "努力有好结果",
    "带钥匙别弄丢",
    "天热防暑",
    "别乱想，爱自己",
    "给自己好心情",
    "按时吃药康复",
    "被温柔幸运包围",
    "忙完犒劳自己",
    "别感冒",
    "做快乐的天使",
    "整理房间心情好",
    "遗憾都释怀",
    "别熬夜伤眼",
    "促进新陈代谢",
    "事事顺心",
    "每天有新惊喜",
    "带口罩保护自己",
    "吃晚餐别饿",
    "累了听歌放松",
    "笑容温暖如初",
    "尽力就好别负担",
    "及时增减衣",
    "浇植物像照顾自己",
    "过得充实快乐",
    "别长时间看屏幕",
    "喉咙别干",
    "期待都实现",
    "带充电宝别没电",
    "慢慢来都会好",
    "吃坚果补能量",
    "心情甜甜",
    "平安到家",
    "放个小假",
    "不负韶华被善待",
    "身体是本钱",
    "早睡早起好",
    "每天有进步",
    "带纸巾备用",
    "干燥涂护手霜",
    "生活很美好",
    "和朋友常联系",
    "好运如期至",
    "饮食要均衡",
    "累了歇歇脚",
    "心情灿烂阳光",

    // 第二次补充（精简后）
    "午后晒晒太阳",
    "备点小零食",
    "听雨也是浪漫",
    "抬头看看云",
    "睡前泡泡脚",
    "穿舒服的鞋",
    "哭哭也没关系",
    "买束小花",
    "钥匙手机放一起",
    "趴桌眯会儿",
    "开盏暖灯",
    "约顿火锅",
    "拉开窗帘迎阳光",
    "水果洗干净吃",
    "难题先深呼吸",
    "备包湿巾",
    "揣个暖手宝",
    "偶尔偷懒没事",
    "想小确幸好梦",
    "及时续水",
    "穿喜欢的衣服",
    "跟猫狗打招呼",
    "站起来走走",
    "有自己的节奏",
    "备瓶酸奶",
    "忘带伞买新的",
    "抱毛绒玩具",
    "给爸妈打电话",
    "夏天吃冰棒",
    "有事说出来",
    "书桌乱点舒服就好",
    "闻闻花香",
    "加班叫车安全第一",
    "往前看有新风景",
    "口袋放颗糖",
    "天冷喝热汤",
    "想做的事现在开始",
    "手机调护眼",
    "跟邻居打招呼",
    "听首歌哼哼",
    "健康快乐最重要",
    "备把小梳子",
    "春天多走走",
    "示弱也可爱",
    "买本笔记本",
    "停电点蜡烛",
    "别熬夜赶工",
    "带包纸巾",
    "捡片落叶做纪念",
    "很多事没标准答案",
    "泡点枸杞",
    "拌嘴别记仇",
    "靠椅发呆",
    "你比想象中厉害",
    "床头放本书",
    "踩踩水洼找快乐",
    "别在意别人眼光",
    "带把小伞",
    "戴顶帽子护耳朵",
    "吃块巧克力",
    "好事在排队",
    "早上喝温水",
    "分享小零食",
    "躺平会儿没事",
    "走稳最重要",
    "种点小绿植",
    "打雷捂耳朵",
    "拆快递是快乐",
    "照镜子微笑",
    "夏天穿宽松点",
    "朋友愿意听你说",
    "放盘水果",
    "抬头挺胸有气场",
    "想见的人尽快见",
    "手机定时休息",
    "穿件针织衫",
    "天空装得下难过",
    "带个小镜子",
    "喝杯热奶茶",
    "你真的很优秀",
    "睡前关手机",
    "视频时多笑笑",
    "揉揉肩膀",
    "舒服自在就好",
    "窗台放台灯",
    "在家看电影惬意",
    "健康就好",
    "带个小发圈",
    "穿亮色像阳光",
    "说句“谢谢”传善意",
    "吃个烤红薯",
    "你已经很努力",
    "泡点柠檬",
    "分享快乐翻倍",
    "伸个懒腰舒服",
    "偶尔停下看风景",

    // 第三次补充（按主题精简）
    // 辛苦了爱自己
    "今天超棒，累了就歇会儿",
    "别硬撑，偷懒也是爱自己",
    "辛苦了，奖励自己块糖吧",
    "喘口气，你已经很厉害了",
    "对自己宽容点，没事的",
    "累了就躺平，碗明天洗",
    "你值得被自己温柔对待",
    "今天的累，会变成明天的甜",
    "说句“我累了”，不丢人",
    "睡前夸夸自己，睡得香",
    "照顾好情绪，就是本事",
    "快去吃点啥，别饿肚子",
    "你想做的，比“应该”重要",
    "月光会带走疲惫，晚安",
    "偶尔摆烂，也没关系呀",

    // 要好心情
    "对阳光笑一笑，心情开花",
    "听首快歌，烦恼跑掉",
    "含颗糖，甜到心里",
    "看云飘，心情慢下来",
    "收拾桌面，好心情来",
    "照镜子做鬼脸，会笑的",
    "喝杯热奶茶，心软软的",
    "翻旧照片，开心会回来",
    "雨天听歌，也有好心情",
    "点支香薰，暖乎乎的",
    "哼跑调歌，自己开心就好",
    "买束小雏菊，看着就甜",
    "静音吃顿饭，心变轻",
    "数星星，心情会亮",
    "跟猫狗打招呼，心情好",

    // 祝福的话
    "愿你步步稳，心里亮",
    "日子像春风，刚刚好",
    "麻烦像泡泡，一戳就破",
    "三餐合口，日日顺心",
    "手里有热饮，心里有暖",
    "烦恼少，快乐多",
    "花店打折，蛋糕新鲜",
    "被温柔遇，笑得坦荡",
    "晚风带走累，月光盖被",
    "低头捡物，抬头有惊喜",
    "付出有回响，努力被见",
    "雨天有伞，寒天有暖",
    "眼里有光，心里有盼",
    "快递合意，消息欢喜",
    "岁月温柔，你要疼爱自己",

    // 期待见面
    "数着日子等见面，想分享",
    "攒了趣事，见面全告诉你",
    "盼见面，想给你个紧拥抱",
    "记着你爱逛的店，一起去",
    "天暖了，适合见面散步",
    "想好吃啥了吗？等你选",
    "写了小本本，见面念给你",
    "备好衣服，想让你见开心的我",
    "盼那句“好久不见”",
    "花开了，等你来看",
    "攒了星星糖，见面分你",
    "想一起压马路，聊到深夜",
    "学了新菜，见面做给你",
    "列了歌单，耳机分你一半",
    "想见面，空气都是甜的",

    // 烦恼消失
    "写烦恼丢垃圾桶，跑掉啦",
    "烦恼像云，风一吹就散",
    "泡个澡，冲掉烦恼",
    "大喊一声，烦恼被带走",
    "吃巧克力，盖过烦恼的苦",
    "雨天会停，烦恼会走",
    "折纸飞机，扔走烦恼",
    "听海浪，烦恼会化",
    "烦恼像线头，剪掉就好",
    "睡好觉，烦恼偷偷溜",
    "跟朋友吐槽，烦恼减半",
    "不理烦恼，它会自己走",
    "跑跑步，汗水带跑烦恼",
    "烦恼像过期零食，该扔",
    "看月亮，照走烦恼",

    // 补充短句
    "爱自己，就是饿了吃，累了睡",
    "自己买冰棍，甜到心",
    "皱眉是想笑，叹气是太幸福",
    "想一起踩落叶，听“咔嚓”",
    "对烦恼挥手，它会走",
    "多喝杯茶，多晒会太阳",
    "听歌做家务，琐碎也甜",
    "难题像解结，轻松过",
    "记了话题，怕见面忘",
    "擦一擦，烦恼像灰尘会没",
    "累了靠墙，你值得",
    "进甜品店，心情会好",
    "每天有小确幸，像突然摸到糖",
    "见面拥抱，要把想念都抱进去",
    "晚风带烦恼走，不回来",
  "早点休息，别熬啦",
  "记得吃早餐呀",
  "多喝水，润润喉",
  "天冷加件衣",
  "出门注意安全",
  "午餐要吃好",
  "累了就歇会儿",
  "睡前泡泡脚",
  "带把伞，防下雨",
  "别饿肚子，吃点啥",
  "穿舒服的鞋呀",
  "天热记得防暑",
  "晚上盖好被子",
  "多吃水果呀",
  "照顾好自己呀",
  "你超棒的，加油",
  "今天也超厉害",
  "慢慢来，都会好",
  "你的努力看得见",
  "别灰心，有我呢",
  "你比想象中强",
  "明天更有盼头",
  "一步一步走稳啦",
  "你值得所有好",
  "坚持住，快到啦",
  "笑一笑，啥都顺",
  "你能做到的",
  "元气满满出发吧",
  "发光的你最可爱",
  "未来一定超棒",
  "保持微笑，心情好",
  "每天都有小幸运",
  "对自己好点呀",
  "日子会越来越甜",
  "累了就抱抱自己",
  "今天也很开心呀",
  "平安喜乐每一天",
  "心想的都能成",
  "你笑起来真好看",
  "慢慢走，不着急",
  "生活有很多甜呢",
  "照顾好情绪呀",
  "每天都有新进步",
  "被温柔包围着呀",
  "努力的你最耀眼",

  // 新增关心日常（100条）
  "早餐加个蛋，元气满",
  "雨天路滑，慢慢走",
  "别久坐，起来动一动",
  "口干了，喝口水呀",
  "睡前关手机，睡得香",
  "春天多散步，闻花香",
  "别憋尿，快去厕所呀",
  "袜子穿厚点，脚不凉",
  "水果洗干净再吃呀",
  "加班别太晚，早点回",
  "肩膀酸了，揉一揉",
  "夏天带瓶水，别渴着",
  "钥匙放好，别弄丢",
  "晚餐吃热点，胃舒服",
  "头发乱了，梳一梳",
  "秋天添件薄外套",
  "别总低头，抬抬头呀",
  "饿了垫点小零食",
  "洗澡水别太烫呀",
  "出门带纸巾，方便",
  "累了靠会儿，不硬撑",
  "冬天揣个暖手宝",
  "别吃太冰，怕肚子疼",
  "鞋带系紧，别绊倒",
  "阴天也给自己放晴",
  "指甲剪剪，别太长",
  "口渴前就喝点水",
  "睡前想件开心事",
  "雾霾天，戴口罩呀",
  "别熬夜刷手机，伤眼",
  "走路看路，别分心",
  "春天别减衣，防感冒",
  "累了躺会儿，不丢人",
  "吃慢点，别噎着呀",
  "夏天穿透气点，舒服",
  "记得给家人报平安",
  "腰累了，垫个靠垫",
  "秋天吃点梨，润润喉",
  "别总皱眉，舒展点呀",
  "饿了就吃，别忍着",
  "袜子湿了，赶紧换",
  "冬天多喝热汤，暖身",
  "别扛重物，小心腰",
  "手机别放床头，辐射小",
  "雨天别踩水，怕着凉",
  "头发吹干再睡觉呀",
  "春天多开窗，通通风",
  "累了深呼吸，放松下",
  "别吃太撑，七分饱好",
  "夏天别贪凉，盖薄被",
  "钥匙和手机放一起",
  "膝盖凉了，盖块布",
  "秋天落叶多，走路看脚",
  "别总说“没事”，真有事说",
  "饿了煮碗面，很快的",
  "鞋子刷干净，穿着爽",
  "冬天戴帽子，护耳朵",
  "别久站，歇歇脚呀",
  "睡前泡脚，睡得沉",
  "雨天伞撑稳，别淋湿",
  "头发油了，洗一洗",
  "春天花粉多，戴口罩",
  "累了听首歌，放松下",
  "别吃太咸，多喝水",
  "夏天风扇别对吹，头疼",
  "记得给植物浇水呀",
  "手腕酸了，甩一甩",
  "秋天晒被子，有太阳味",
  "别憋着气，叹口气也好",
  "饿了煎个蛋，快又香",
  "衣服穿宽松，舒服点",
  "冬天围巾围好，不冻脖子",
  "别爬高，小心点呀",
  "手机定时，别玩太久",
  "雨天回家先换鞋",
  "头发长了，剪一剪",
  "春天多吃芽菜，新鲜",
  "累了闭目养神，5分钟够",
  "别吃剩菜，怕坏肚子",
  "夏天多吃西瓜，补水",
  "记得给朋友发消息",
  "脚踝酸了，揉一揉",
  "秋天吃点坚果，补能量",
  "别硬撑坚强，哭也可以",
  "饿了喝杯奶，垫一垫",
  "袜子穿纯棉，不闷脚",
  "冬天多晒太阳，补钙",
  "别乱吃药，遵医嘱呀",
  "睡前拉窗帘，遮光好",
  "雨天别骑车，不安全",
  "头发分叉，剪一剪",
  "春天多运动，长精神",
  "累了伸懒腰，全身松",
  "别吃太甜，防蛀牙",
  "夏天睡午觉，下午有精神",
  "记得带钥匙出门呀",

  // 新增鼓舞人心（100条）
  "今天的你，比昨天棒",
  "小进步，也值得开心",
  "你一笑，世界都亮了",
  "慢慢来，不急，你可以",
  "你做的，已经很好了",
  "困难会走，你会更稳",
  "你值得被好好对待",
  "再坚持下，就快成了",
  "你的努力，藏不住的",
  "今天也在发光呀",
  "别小看自己，超厉害",
  "明天的你，更有力量",
  "每一步，都算数的",
  "你笑起来，超治愈的",
  "累了也没关系，休息是为了走更远",
  "你比自己想的，更勇敢",
  "好事在来的路上啦",
  "今天的你，超有耐心",
  "坚持住，光在前面呢",
  "你的善良，会有回响",
  "别慌，一切都在变好",
  "你认真的样子，超帅",
  "小目标达成，真棒呀",
  "明天太阳升起，又是新的",
  "你值得所有温柔和甜",
  "难的时候，再撑撑，会过的",
  "你的努力，有人看见的",
  "今天也在好好生活呀",
  "别否定自己，你超棒的",
  "一步一步，靠近梦想啦",
  "你笑起来，像小太阳",
  "累了就歇，不影响优秀",
  "你比昨天，更懂自己了",
  "好运会找上努力的你",
  "今天的你，超有韧性",
  "小确幸，藏在你身边呢",
  "别着急，你有自己的节奏",
  "你的坚持，会开花的",
  "今天也在闪闪发光呀",
  "你值得被世界偏爱",
  "难走的路，都是上坡",
  "你的用心，会被珍惜",
  "今天的你，超有活力",
  "小失败，也是经验呀",
  "别担心，你有能力应对",
  "你的笑容，能治愈一切",
  "累了是正常的，你很棒了",
  "你比想象中，更有办法",
  "好事会慢慢轮到你",
  "今天的你，超有担当",
  "每一次尝试，都值得夸",
  "别慌，你在成长呀",
  "你的努力，会积累成奇迹",
  "今天也在认真对待生活",
  "你值得最好的一切呀",
  "难的时候，记得你超厉害",
  "你的付出，不会白费的",
  "今天的你，超有温度",
  "小进步累积，会成大跨越",
  "别怀疑，你就是优秀的",
  "阳光总在风雨后，你也是",
  "你的存在，本身就很有意义",
  "累了就休息，不代表放弃",
  "你比昨天，更强大一点了",
  "好运正在打包给你呢",
  "今天的你，超有勇气",
  "每一次坚持，都很酷呀",
  "别着急，美好会等你",
  "你的努力，让世界更暖",
  "今天也在好好爱自己呀",
  "你值得被温柔包围着",
  "难走的路，走完就是风景",
  "你的用心，藏在细节里",
  "今天的你，超有智慧",
  "小失误，不影响你很棒",
  "别担心，你有很多人支持",
  "你的笑容，是最好的礼物",
  "累了是暂时的，你会更好",
  "你比想象中，更受欢迎",
  "好事正在排队等你签收",
  "今天的你，超有毅力",
  "每一次开始，都值得鼓励",
  "别慌，你走的每步都对",
  "你的努力，会被时间记住",
  "今天也在创造小美好呀",
  "你值得所有的掌声和赞",
  "难的时候，想想你的闪光点",
  "你的付出，正在开花结果",
  "今天的你，超有魅力",
  "小改变，也值得庆祝呀",
  "别怀疑，你就是被需要的",
  "风雨过后，你会更耀眼",
  "你的存在，给别人带来光",
  "累了就抱抱自己，你辛苦了",
  "你比昨天，更懂得珍惜了",
  "好运会偏爱努力的你呀",
  "今天的你，超了不起"
];

        const colors = [
            'card-pink', 'card-blue', 'card-purple', 'card-orange',
            'card-green', 'card-yellow', 'card-teal', 'card-peach'
        ];

        let userPrefix = ''; // 用户输入的前缀
        let animationInterval = null;
        const occupiedPositions = []; // 记录已占用的位置
        const cardElements = []; // 记录所有卡片元素
        const MAX_CARDS = 200; // 最大卡片数量

        // 页面加载时检查URL参数
        function checkUrlParams() {
            const urlParams = new URLSearchParams(window.location.search);
            const encryptedParam = urlParams.get('u');
            
            if (encryptedParam) {
                userPrefix = decryptName(encryptedParam);
                if (userPrefix) {
                    document.getElementById('inputOverlay').classList.add('hidden');
                    startAnimation();
                }
            }
        }

        // 显示提示框
        function showToast(message) {
            const toast = document.createElement('div');
            toast.textContent = message;
            toast.style.cssText = `
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: linear-gradient(180deg, #ffd93d 0%, #ffb700 100%);
                color: #2d2d2d;
                padding: 20px 40px;
                border: 4px solid #2d2d2d;
                border-radius: 0;
                font-size: 18px;
                font-weight: 700;
                font-family: 'Courier New', monospace;
                text-transform: uppercase;
                letter-spacing: 2px;
                text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
                box-shadow: 
                    6px 6px 0 #1a1a1a,
                    inset -2px -2px 0 rgba(0, 0, 0, 0.2),
                    inset 2px 2px 0 rgba(255, 255, 255, 0.4);
                z-index: 10000;
                animation: pixelPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            `;
            document.body.appendChild(toast);
            
            setTimeout(() => {
                toast.style.animation = 'pixelFade 0.2s ease-out';
                setTimeout(() => toast.remove(), 200);
            }, 2000);
        }

        // 确定输入
        function confirmInput() {
            const input = document.getElementById('userInput');
            userPrefix = input.value.trim();
            
            // 允许为空，直接开始
            if (userPrefix) {
                // 生成加密链接
                const baseUrl = window.location.origin + window.location.pathname;
                const encrypted = simpleMD5(userPrefix);
                const shareUrl = `${baseUrl}?u=${encrypted}`;
                
                // 复制到剪贴板
                navigator.clipboard.writeText(shareUrl).then(() => {
                    showToast('链接已复制到剪贴板！');
                }).catch(() => {
                    // 如果复制失败，显示链接
                    showToast('复制失败，请手动复制');
                    console.log('分享链接：', shareUrl);
                });
            }
            
            // 关闭输入框并开始动画（无论是否为空）
            document.getElementById('inputOverlay').classList.add('hidden');
            startAnimation();
        }

        // 回车键确定
        document.addEventListener('DOMContentLoaded', function() {
            const input = document.getElementById('userInput');
            input.addEventListener('keypress', function(e) {
                if (e.key === 'Enter') {
                    confirmInput();
                }
            });
            
            // 检查URL参数
            checkUrlParams();
        });

        // 检查位置是否重叠
        function isOverlapping(x, y, width, height) {
            for (let pos of occupiedPositions) {
                if (!(x + width < pos.x || 
                      x > pos.x + pos.width || 
                      y + height < pos.y || 
                      y > pos.y + pos.height)) {
                    return true;
                }
            }
            return false;
        }

        // 找到可用位置
        function findAvailablePosition() {
            const cardWidth = 240;  // 固定宽度
            const cardHeight = 150; // 最大高度（包含padding和border）
            const padding = 20;     // 安全边距
            const maxAttempts = 80;
            
            // 获取视口尺寸
            const viewportWidth = window.innerWidth;
            const viewportHeight = window.innerHeight;
            
            // 确保有足够空间
            const maxX = Math.max(0, viewportWidth - cardWidth - padding);
            const maxY = Math.max(0, viewportHeight - cardHeight - padding);
            
            for (let i = 0; i < maxAttempts; i++) {
                const x = Math.random() * maxX + padding;
                const y = Math.random() * maxY + padding;
                
                // 确保在视口内
                if (x >= padding && x + cardWidth <= viewportWidth - padding &&
                    y >= padding && y + cardHeight <= viewportHeight - padding) {
                    if (!isOverlapping(x, y, cardWidth, cardHeight)) {
                        occupiedPositions.push({ x, y, width: cardWidth, height: cardHeight });
                        return { x, y };
                    }
                }
            }
            
            // 如果找不到位置，返回安全的随机位置
            const x = Math.min(Math.random() * maxX + padding, viewportWidth - cardWidth - padding);
            const y = Math.min(Math.random() * maxY + padding, viewportHeight - cardHeight - padding);
            return { x, y };
        }

        // 移除最早的卡片
        function removeOldestCard() {
            if (cardElements.length > 0) {
                const oldestCard = cardElements.shift();
                const oldestPosition = occupiedPositions.shift();
                
                // 添加淡出动画
                oldestCard.style.transition = 'opacity 0.4s ease-out, transform 0.4s ease-out';
                oldestCard.style.opacity = '0';
                oldestCard.style.transform = 'scale(0.8)';
                
                setTimeout(() => {
                    if (oldestCard.parentNode) {
                        oldestCard.remove();
                    }
                }, 400);
            }
        }

        // 创建祝福卡片
        function createBlessingCard() {
            // 如果达到最大数量，移除最早的卡片
            if (cardElements.length >= MAX_CARDS) {
                removeOldestCard();
            }

            const card = document.createElement('div');
            card.className = 'blessing-card ' + colors[Math.floor(Math.random() * colors.length)];
            
            const text = document.createElement('div');
            const blessing = blessings[Math.floor(Math.random() * blessings.length)];
            // 如果有前缀就加波浪号，没有就直接显示祝福语
            text.textContent = userPrefix ? `${userPrefix}~${blessing}` : blessing;
            
            card.appendChild(text);

            // 找到可用位置
            const position = findAvailablePosition();
            card.style.left = position.x + 'px';
            card.style.top = position.y + 'px';

            // 随机旋转角度（-3度到3度）
            const rotation = (Math.random() - 0.5) * 6;
            card.style.transform = `rotate(${rotation}deg)`;

            // 随机动画延迟
            card.style.animationDelay = Math.random() * 0.2 + 's';

            document.body.appendChild(card);
            
            // 记录卡片元素
            cardElements.push(card);
        }

        // 开始动画
        function startAnimation() {
            if (animationInterval) return;
            
            // 持续生成卡片，达到200条后自动替换最早的
            animationInterval = setInterval(() => {
                createBlessingCard();
            }, 300);
        }

        // 窗口大小变化时，调整超出视口的卡片位置
        window.addEventListener('resize', function() {
            const viewportWidth = window.innerWidth;
            const viewportHeight = window.innerHeight;
            const cardWidth = 240;
            const cardHeight = 150;
            const padding = 20;
            
            cardElements.forEach(card => {
                const rect = card.getBoundingClientRect();
                let needsAdjust = false;
                let newLeft = parseFloat(card.style.left);
                let newTop = parseFloat(card.style.top);
                
                // 检查是否超出右边界
                if (rect.right > viewportWidth - padding) {
                    newLeft = viewportWidth - cardWidth - padding;
                    needsAdjust = true;
                }
                
                // 检查是否超出底边界
                if (rect.bottom > viewportHeight - padding) {
                    newTop = viewportHeight - cardHeight - padding;
                    needsAdjust = true;
                }
                
                // 检查是否超出左边界
                if (rect.left < padding) {
                    newLeft = padding;
                    needsAdjust = true;
                }
                
                // 检查是否超出顶边界
                if (rect.top < padding) {
                    newTop = padding;
                    needsAdjust = true;
                }
                
                // 应用调整
                if (needsAdjust) {
                    card.style.left = newLeft + 'px';
                    card.style.top = newTop + 'px';
                }
            });
        });
    </script>
</body>
</html>
